Skip to content

olm try to decrypt with recent session first#5872

Merged
bmarty merged 1 commit intodevelopfrom
feature/bca/crypto_olm_faster_decrypt
Apr 29, 2022
Merged

olm try to decrypt with recent session first#5872
bmarty merged 1 commit intodevelopfrom
feature/bca/crypto_olm_faster_decrypt

Conversation

@BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Apr 29, 2022

Type of change

  • Other :quick perf

Content

When we receive an encrypted to device, the SDK has to try to decrypt with all the known endToEnd olm session with the sender, until it founds one working.
According to some android logs, we can see as much as 300 olm session with the same device. This is not expected and probably due to some race issue but none the less currently we are trying to decrypt with all of them but in the wrong order, leading to lot of unnecessary trials. By using proper order we will now decrypt to devices faster.

This PR is not adressing the proliferation of olm session. This PR should have adressed this, and the existing logs are probably from older sessions.

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@BillCarsonFr BillCarsonFr force-pushed the feature/bca/crypto_olm_faster_decrypt branch from 1a32815 to 50a4d2b Compare April 29, 2022 09:02
@github-actions
Copy link

Unit Test Results

118 files  ±0  118 suites  ±0   1m 30s ⏱️ -11s
203 tests ±0  203 ✔️ ±0  0 💤 ±0  0 ±0 
682 runs  ±0  682 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 50a4d2b. ± Comparison against base commit cd52df5.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@bmarty bmarty merged commit cbc29d0 into develop Apr 29, 2022
@bmarty bmarty deleted the feature/bca/crypto_olm_faster_decrypt branch April 29, 2022 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants